import { createApp } from "vue";
import App from "./App.vue";
import router from "./router/index.js";

const app = createApp(App);
app.use(router);
//引用 pinia
import { createPinia } from "pinia";
const pinia = createPinia();
app.use(pinia);

//引用工具函数
import lodash from "lodash";
window._ = lodash;

//引用vant
import {
    Progress,
    Button,
    Col,
    Row,
    TimePicker,
    DatePicker,
    Dialog,
    Tabbar,
    TabbarItem,
    Search,
    Swipe,
    SwipeItem,
    Field,
    Collapse,
    CollapseItem,
    Rate,
    Icon,
    Empty,
    Badge,
    Popup,
} from "vant";
// 2. 引入组件样式
import "vant/lib/index.css";

//3. 注册你需要的组件
app.use(Button);
app.use(Col);
app.use(Row);
app.use(Dialog);
app.use(TimePicker);
app.use(DatePicker);
app.use(Progress);
app.use(Tabbar);
app.use(TabbarItem);
app.use(Search);
app.use(Swipe);
app.use(SwipeItem);
app.use(Field);
app.use(Collapse);
app.use(CollapseItem);
app.use(Rate);
app.use(Icon);
app.use(Empty);
app.use(Badge);
app.use(Popup);
//组件复用 mixin 复合引用
app.mixin({
    setup() {},
    methods: {},
});
app.mount("#app");
